<template>
  <div id="app" :style="{'overflow-x':$store.state.app.screenWidth<1200?'scroll':'hidden' }">
    <!--  PC端登录  -->
    <login-pc v-if="$store.state.app.screenWidth>500"></login-pc>
    <!--  移动端登录  -->
    <loginMobile v-if="$store.state.app.screenWidth<500"></loginMobile>
    <div class="beian" v-show="showInfo">
      <img src="../../assets/images/police.png" style="width: 15px;height: auto" />
      <a style="margin: 0 10px 0 5px" :href="href">{{policeInfo}}</a>
      <span><a  href="https://beian.miit.gov.cn">{{icpInfo}}</a></span>
    </div>
  </div>
</template>
<script>


import loginMobile from '../../components/LoginMobile/normal'
// import loginPc from '../../components/LoginPC/normalRed'
// import loginTime from '../../components/LoginPC/normalTime'
// import loginPc from '../../components/LoginPC/normalStar'
// import loginYD from '../../components/LoginPC/normalSnow'
import loginPc from '../../components/LoginPC/normalSnow'
// import loginPc from '../../components/LoginPC/index'
// import loginPc from '../../components/LoginPC/normal'
import { getIcpInfo } from '@/api/getData'
export default {
  name: 'Login',
  components: {
    loginMobile,
    loginPc,
  },
  data() {
    return {
      policeInfo: '',
      icpInfo: '',
      showInfo: false,
      href: '',
    }
  },
  async mounted(){
    let returnData = await getIcpInfo({});
    window.name = 'shwoNotice'
    if(returnData._result&&returnData.data){
      this.policeInfo = returnData.data.policeNo?returnData.data.policeNo:'';
      this.icpInfo = returnData.data.icpNo?returnData.data.icpNo:'';
      this.href = returnData.data.policeNo&&returnData.data.recordCode?'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode='+returnData.data.recordCode:'#';
      this.showInfo = this.policeInfo&&this.icpInfo?true:false;
      document.title = returnData.data.website
      // this.showInfo = true;
    }
  }
}
</script>

<style scoped>
.beian{
  width: 100%;
  height: 40px;
  background: rgba(0,0,0,0.1);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 40px;
  color: #e6e6e6;
  font-size: 12px;
  letter-spacing: 1px;
}
</style>


